﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace EpidemicSimulator.reports
{
    [DataContract]
    public class SimulationReport
    {
        [DataMember]
        public SimulationReportDataSet[] dataSets { get; set; }
    }

    [DataContract]
    public class SimulationReportDataSet
    {
        public SimulationReportDataSet()
        {
            m_values = new List<int>();
        }

        private List<int> m_values;

        [DataMember]
        public String label { get; set; }

        [DataMember]
        public String color { get; set; }

        [DataMember]
        public int[] values {
            get { return m_values.ToArray(); }
            set
            {
                m_values.InsertRange(0, value);
            }
        }

        public void addValue(int value)
        {
            m_values.Add(value);
        }
    }
}
